
import 'package:flutter/material.dart';
import 'package:flutter_deer/account/iview/valid_withdraw_password_iview.dart';
import 'package:flutter_deer/mvp/base_page_presenter.dart';
import 'package:flutter_deer/net/base_entity.dart';
import 'package:flutter_deer/net/dio_utils.dart';
import 'package:flutter_deer/net/http_api.dart';
import 'package:flutter_deer/util/other_utils.dart';


class ValidWithdrawPasswordPresenter extends BasePagePresenter<ValidWithdrawPasswordIMvpView> {

  @override
  void initState() {
  }

  Future<dynamic> validWithdrawPassword(String? password) async {
    WidgetsBinding.instance.addPostFrameCallback((_) {
      requestNetwork<OperatorBaseEntity>(Method.get,
          url: HttpApi.validWithdrawPassword.replaceAll('{password}', password.nullSafe),
          onSuccess: (data) {
            view.validWithdrawPasswordResult(data!.data);
          },
          onError: (code, msg) {

          }
      );
    });
  }
}